<!--
 * @FilePath     : /study_code/vue2.x/transition-element_component4 copy.html
 * @Description  : css 动画实现过渡
 * @Date         : 2025-05-03 08:01:03
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-05-03 08:01:03
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <style>
      .bounce-enter-active {
        animation: bounce-in 0.5s;
      }

      .bounce-leave-active {
        animation: bounce-in 0.5s reverse;
      }

      @keyframes bounce-in {
        0% {
          transform: scale(0);
        }

        50% {
          transform: scale(1.5);
        }

        100% {
          transform: scale(1);
        }
      }
    </style>
  </head>
  <body>
    <div id="app">
      <button @click="show = !show">Toggle show</button>
      <transition name="bounce">
        <p v-if="show">
          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris facilisis enim libero, at
          lacinia diam fermentum id. Pellentesque habitant morbi tristique senectus et netus.
        </p>
      </transition>
    </div>

    <script src="/vue/dist/vue.min.js"></script>
    <script src="./common.js"></script>
    <script>
      // 自定义组件
      const myComponent = {
        data: function () {
          return {}
        },
        props: [],
        template: ``,
        methods: {},
      }

      var app = new Vue({
        el: '#app',
        data: function () {
          return { show: true }
        },
      })
    </script>
  </body>
</html>
